import request from '@/utils/request'
import type { UserLogin } from '@/models/user.model'
class UserService {
  baseUrl = '/user'

  login(data) {
    return request.post<UserLogin>(this.baseUrl + '/login', data)
  }
  register(data) {
    return request({
      url: this.baseUrl + '/register',
      method: 'post',
      data
    })
  }
}

export const userService = new UserService()
